package com.example.qq.utils;

import com.qcloud.cos.COSClient;
import com.qcloud.cos.model.Bucket;

import java.util.List;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2021/2/28 21:33
 */
public class QcloudDemo
{
    public static void main(String[] args)
    {
        COSClient client = ClientUtil.getTestClient();
        List<Bucket> buckets = client.listBuckets();
        for (Bucket bucketElement : buckets)
        {
            String bucketName = bucketElement.getName();
            String bucketLocation = bucketElement.getLocation();
            System.out.println(bucketName+":"+bucketLocation);
        }
        client.shutdown();
    }
}
